package com.huiminpay.merchant.api;

import com.huiminpay.common.cache.domain.BusinessException;
import com.huiminpay.common.cache.domain.PageVO;
import com.huiminpay.merchant.dto.MerchantDTO;
import com.huiminpay.merchant.dto.StaffDTO;
import com.huiminpay.merchant.dto.StoreDTO;

public interface IMerchantService {

    MerchantDTO queryMerchantById(Long merchantId);

    MerchantDTO createMerchant(MerchantDTO merchantDTO) throws BusinessException;

    void applyMerchant(Long merchantId, MerchantDTO merchantDTO) throws BusinessException;

    /**
     * 商户下新增门店
     * @param storeDTO
     */
    StoreDTO createStore(StoreDTO storeDTO) throws BusinessException;

    /**
     * 商户新增员工
     * @param staffDTO
     */
    StaffDTO createStaff(StaffDTO staffDTO) throws BusinessException;

    /**
     * 为门店设置管理员
     * @param storeId
     * @param staffId
     * @throws BusinessException
     */
    void bindStaffToStore(Long storeId, Long staffId) throws BusinessException;

    MerchantDTO queryMerchantByTenantId(Long tenantId) throws BusinessException;

    /**
     * 分页条件查询商户下门店
     * @param storeDTO
     * @param pageNo
     * @param pageSize
     * @return
     */
    PageVO<StoreDTO> queryStoreByPage(StoreDTO storeDTO, Integer pageNo, Integer pageSize);

    /**
     * \* 查询门店是否属于某商户
     * \* @param storeId
     * \* @param merchantId
     * \* @return
     */
    Boolean queryStoreInMerchant(Long storeId, Long merchantId);

}
